import request from '@/utils/request'
export const roleList = params => request.get('/sys/role', {
  params
})
// 删除角色
export const delRow = id => request.delete(`/sys/role/${id}`)
// 新增角色
export const addRole = data => request.post('/sys/role', data)
// 修改角色
export const updateRole = data => request({
  url: `/sys/role/${data.id}`,
  method: 'put',
  data
})
// 获取角色详情
export const getRoleDetail = id => request.get(`/sys/role/${id}`)

// 获取公司信息
export const getCompanyInfo = id => request.get(`/company/${id}`)
// 给角色分配权限  /sys/role/assignPrem
export const assignPrem = data => request.put('/sys/role/assignPrem', data)
